home *** CD-ROM | disk | FTP | other *** search
- Path: wup-gate.wup.de!mlc
- From: mlc@wup.de (Michael Lechner)
- Newsgroups: comp.lang.c++
- Subject: Re: Bug? MSVC++ 4.0, Windows 95, Virtual Destructors, & DLL's
- Date: 14 Feb 1996 11:40:33 GMT
- Organization: Wiechers & Partner Datentechnik GmbH, D-40789 Monheim
- Message-ID: <4fshnh$k64@wup-gate.wup.de>
- References: <3117efd3.956426@news.primenet.com>
- NNTP-Posting-Host: 149.237.31.100
- X-Newsreader: TIN [version 1.2 PL2]
-
- Gary Edstrom (gbe@primenet.com) wrote:
- : Here's a strange problem that I have been trying to figure out all day
- : today. I have a program that consists of 2 parts:
-
- : 1. A DLL that contains a simple class with an empty constructor
- : and an empty virtual destructor.
-
- : 2. An EXE that contains exactly the same type of class, but with a
- : different name.
-
- : [...]
- : Can anyone else duplicate this problem? Does anyone have any idea
- : what is going on? Have I come across some sort of compiler bug? The
- : only clue that I seem to have discovered is that the first version
- : (the one resident in the EXE file) executes an internal function
- : called "scaler deleting destructor", while the second version (the one
- : defined in the DLL file) executes an internal function called "vector
- : deleting destructor".
-
- I don't believe that your example points to the problem! I could
- not reproduce the error (using VC++ 2.2).
-
- : object2 * o2 = new object2;
- : delete o2; // This delete executes OK
- : }
-
- : {
- : object1 * o1 = new object1;
- : delete o1; // This delete produces an assertion error
- : }
-
- delete o1 should never call the delete[] operator. Anyway you
- should now that msvc overload the operator new and delete if you
- compile with debug - option.
-
- cu
-
- Michael
-
-
- --
- +-------------------------------+--------------------------------------+
- | Michael Lechner | Wiechers & Partner Datentechnik GmbH |
- | | Forschung & Entwicklung (R&D) |
- | | An der alten Ziegelei 2 |
- | eMail: mlc@wupmon.wup.de | D-40771 Monheim (Germany) |
- +-------------------------------+--------------------------------------+
-
-